package com.shazhu.nongjt.service.impl;

import java.util.List;
import com.shazhu.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.shazhu.nongjt.mapper.NjtQualificationStatisticsMapper;
import com.shazhu.nongjt.domain.NjtQualificationStatistics;
import com.shazhu.nongjt.service.INjtQualificationStatisticsService;

/**
 * 合格证统计信息Service业务层处理
 * 
 * @author shazhu
 * @date 2025-09-29
 */
@Service
public class NjtQualificationStatisticsServiceImpl implements INjtQualificationStatisticsService 
{
    @Autowired
    private NjtQualificationStatisticsMapper njtQualificationStatisticsMapper;

    /**
     * 查询合格证统计信息
     * 
     * @param id 合格证统计信息主键
     * @return 合格证统计信息
     */
    @Override
    public NjtQualificationStatistics selectNjtQualificationStatisticsById(Long id)
    {
        return njtQualificationStatisticsMapper.selectNjtQualificationStatisticsById(id);
    }

    /**
     * 查询合格证统计信息列表
     * 
     * @param njtQualificationStatistics 合格证统计信息
     * @return 合格证统计信息
     */
    @Override
    public List<NjtQualificationStatistics> selectNjtQualificationStatisticsList(NjtQualificationStatistics njtQualificationStatistics)
    {
        return njtQualificationStatisticsMapper.selectNjtQualificationStatisticsList(njtQualificationStatistics);
    }

    /**
     * 新增合格证统计信息
     * 
     * @param njtQualificationStatistics 合格证统计信息
     * @return 结果
     */
    @Override
    public int insertNjtQualificationStatistics(NjtQualificationStatistics njtQualificationStatistics)
    {
        njtQualificationStatistics.setCreateTime(DateUtils.getNowDate());
        return njtQualificationStatisticsMapper.insertNjtQualificationStatistics(njtQualificationStatistics);
    }

    /**
     * 修改合格证统计信息
     * 
     * @param njtQualificationStatistics 合格证统计信息
     * @return 结果
     */
    @Override
    public int updateNjtQualificationStatistics(NjtQualificationStatistics njtQualificationStatistics)
    {
        njtQualificationStatistics.setUpdateTime(DateUtils.getNowDate());
        return njtQualificationStatisticsMapper.updateNjtQualificationStatistics(njtQualificationStatistics);
    }

    /**
     * 批量删除合格证统计信息
     * 
     * @param ids 需要删除的合格证统计信息主键
     * @return 结果
     */
    @Override
    public int deleteNjtQualificationStatisticsByIds(Long[] ids)
    {
        return njtQualificationStatisticsMapper.deleteNjtQualificationStatisticsByIds(ids);
    }

    /**
     * 删除合格证统计信息信息
     * 
     * @param id 合格证统计信息主键
     * @return 结果
     */
    @Override
    public int deleteNjtQualificationStatisticsById(Long id)
    {
        return njtQualificationStatisticsMapper.deleteNjtQualificationStatisticsById(id);
    }
}
